<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta content="telephone=no" name="format-detection">
    <title>租赁</title>
    <link rel="stylesheet" href="../addons/orange_spacerental/style/css/rent.css"/>
    <link rel="stylesheet" href="../addons/orange_spacerental/style/weui/weui.css"/>
</head>
<body ontouchstart>
<div class="container">
    <div class="history">
        <ul>


            {loop $orderInfoList $orderInfo}

                 {php $spaceInfo = $this->getSpaceInfoById($orderInfo['space_id']);}
            {if $orderInfo['status'] == 2 || $orderInfo['status'] == 1}
            <li>

                <a href="{php echo $this->createMobileUrl('SpaceRentalOrderDetail',array('order_id'=>$orderInfo['id']));}">
                    <div class="histroy-box">
                        <p class="history-title">{php echo $this->getSpaceNameById($orderInfo['space_id'])}</p>
                        <div class="history-det">
                            <p class="histroy-item">租赁日期：{$orderInfo['day']}</p>
                            <p class="histroy-item">租赁时间：{$orderInfo['pro_names']}</p>
                            <p class="histroy-item">租赁地址：{$spaceInfo['space_address']}</p>
                            <p class="histroy-time">预约时间：{php echo date('Y-m-d H:i', $orderInfo['create_time']);}

                                {if $orderInfo['status'] == 1}
                                <span class="float-right histroy-type histroy-type-succ">待审核</span>
                                {else}
                                <span class="float-right histroy-type histroy-type-succ">预约成功</span>
                                {/if}
                            </p>
                        </div>

                    </div>
                </a>
            </li>
            {else}

            <li>
                <a href="{php echo $this->createMobileUrl('SpaceRentalOrderDetail',array('order_id'=>$orderInfo['id']));}">
                    <div class="histroy-box">
                        <p class="history-title history-title-fail">{php echo $this->getSpaceNameById($orderInfo['space_id'])}</p>
                        <div class="history-det">
                            <p class="histroy-item">租赁时间：{$orderInfo['day']} {$orderInfo['pro_names']}</p>
                            <p class="histroy-item">租赁地址：{$spaceInfo['space_address']}</p>
                            <p class="histroy-time">预约时间：{php echo date('Y-m-d H:i', $orderInfo['create_time']);}


                                {if $orderInfo['status'] == -1}
                                <span class="float-right histroy-type histroy-type-fail">预约失败</span>
                                {elseif $orderInfo['status'] == -2}
                                <span class="float-right histroy-type histroy-type-fail">已使用</span>
                                {elseif $orderInfo['status'] == -3}
                                <span class="float-right histroy-type histroy-type-fail">已过期</span>
                                {/if}

                        </div>

                    </div>
                </a>
            </li>
            {/if}
            {/loop}


        </ul>
    </div>
</div>
<script src="../addons/orange_spacerental/style/js/jquery-2.1.4.min.js"></script>
<script src="../addons/orange_spacerental/style/js/weuiAct.js"></script>
<script src="../addons/orange_spacerental/style/js/common.js"></script>
</body>
</html>